package cn.school.controller.app;

import cn.school.common.api.CommonResult;
import cn.school.newExam.service.ExamScoreService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: lx
 * @date: 2024/1/19 9:50
 * @description:
 */
@RestController
@RequestMapping("/app/new/exam")
@Api(tags = "App 学生考试信息")
@Slf4j
public class AppNewExamController {

    @Autowired
    ExamScoreService examScoreService;

    @RequestMapping("/getStudentAllExamScore/{studentId}")
    public CommonResult getStudentAllExamScore(@PathVariable("studentId")Long studentId){
        List<Map<String, Object>> studentAllExamScore = examScoreService.getStudentAllExamScore(studentId);
        return CommonResult.success(studentAllExamScore);
    }

}
